function editDisplayColor(data){
	var link = "/displayColorService";
	var data = { func : "loadDisplayColor"
			}
	simpleservice(link,data,setDisplay);
}

function setDisplay(data){
	var objArray = new Array();
	objArray = JSON.parse(data);
	var checkLogOut = checkSessionAdmin(objArray);
	if(checkLogOut)
		return;
	$("#reserved").val(objArray['reserved']);
	$("#reserved").next("div").css("background-color", objArray['reserved']);
	$("#sample1").css("background-color",objArray['reserved']);
	
	$("#checkin").val(objArray['checkin']);
	$("#checkin").next("div").css("background-color", objArray['checkin']);
	$("#sample2").css("background-color",objArray['checkin']);
	
	$("#checkout").val(objArray['checkout']);
	$("#checkout").next("div").css("background-color", objArray['checkout']);
	$("#sample3").css("background-color",objArray['checkout']);
	
	$("#temp").val(objArray['temp']);
	$("#temp").next("div").css("background-color", objArray['temp']);
	$("#sample4").css("background-color",objArray['temp']);
	
	$("#touchup").val(objArray['touchup']);
	$("#touchup").next("div").css("background-color", objArray['touchup']);
	$("#sample5").css("background-color",objArray['touchup']);
	
	$("#dirty").val(objArray['dirty']);
	$("#dirty").next("div").css("background-color", objArray['dirty']);
	$("#sample6").css("background-color",objArray['dirty']);
	
	$("#inspect").val(objArray['inspect']);
	$("#inspect").next("div").css("background-color", objArray['inspect']);
	$("#sample7").css("background-color",objArray['inspect']);
	
	$("#clean").val(objArray['clean']);
	$("#clean").next("div").css("background-color", objArray['clean']);
	$("#sample8").css("background-color",objArray['clean']);
	
	$("#repair").val(objArray['repair']);
	$("#repair").next("div").css("background-color", objArray['repair']);
	$("#sample9").css("background-color",objArray['repair']);
	
	$("#donotreserve").val(objArray['dnr']);
	$("#donotreserve").next("div").css("background-color", objArray['dnr']);
	$("#sample10").css("background-color",objArray['dnr']);
	
	
	$("#txttravelAgentBooking").val(objArray['trvelagentbooking']);
	$("#txtcorporateBooking").val(objArray['coperatebooking']);
	$("#txtonlineWebBooking").val(objArray['onlinebooking']);
	$("#txtgroupBookingCode").val(objArray['groupbooking']);
	$("#txtotherBookingCode").val(objArray['otherbooking']);
	
	$("#travelAgentBooking").html("("+objArray['trvelagentbooking']+")");
	$("#corporateBooking").html("("+objArray['coperatebooking']+")");
	$("#onlineWebBooking").html("("+objArray['onlinebooking']+")");
	$("#groupBookingCode").html("("+objArray['groupbooking']+")");
	$("#otherBookingCode").html("("+objArray['otherbooking']+")");
	
}

function saveChange(){
	var reserved = $("#reserved").val();
	var checkin = $("#checkin").val();
	var checkout = 	$("#checkout").val();
	var temp = 	$("#temp").val();
	var touchup = 	$("#touchup").val();
	var dirty = 	$("#dirty").val();
	var inspect = 	$("#inspect").val();
	var clean = 	$("#clean").val();
	var repair = 	$("#repair").val();
	var donotreserve = 	$("#donotreserve").val();
	var txttravelAgentBooking = 	$("#txttravelAgentBooking").val();
	var txtcorporateBooking = 	$("#txtcorporateBooking").val();
	var txtonlineWebBooking = 	$("#txtonlineWebBooking").val();
	var txtgroupBookingCode = 	$("#txtgroupBookingCode").val();
	var txtotherBookingCode = 	$("#txtotherBookingCode").val();
	var link = "/displayColorService";
	var data = { func : "editDisplayColor",
			reserved:reserved,
			checkin:checkin,
			checkout:checkout,
			temp:temp,
			touchup:touchup,
			dirty:dirty,
			inspect:inspect,
			clean:clean,
			repair:repair,
			dnr:donotreserve,
			group:txtgroupBookingCode,
			online:txtonlineWebBooking,
			other:txtotherBookingCode,
			travel:txttravelAgentBooking,
			coperate:txtcorporateBooking
			}
	simpleservice(link,data,editDisplayColor);
}